#include <stdio.h>    
#include <stdlib.h>    
#include <unistd.h>
#include <sys/types.h>    
    
int main()    
{    
    int val = 3;    
    pid_t id = fork();    
    
    if(id == 0)    
    {    
        printf("child: val = %d, &val = %p\n", val, &val);
        val = 5;    
        sleep(1);    
        printf("child: val = %d, &val = %p\n", val, &val);    
    
        return 0;    
    }    
    
    
    printf("parent:val = %d, &val = %p\n", val, &val);    
    sleep(2);    
    printf("parent:val = %d, &val = %p\n", val, &val);    
                                                      
    return 0;                                         
}    
